#pragma once

#include "G4String.hh"
#include "G4VSDFilter.hh"
//#include "globals.hh"

class AtomNumFilterMsgr;

class AtomNumFilter : public G4VSDFilter
{
public:
    AtomNumFilter(const G4String& name, G4int targetZ, G4int Zmax, const G4String& cat);
    //AtomNumFilter(const AtomNumFilter& a); // 拷贝构造函数，用于worker中复制实例
    ~AtomNumFilter() override;

    G4bool Accept(const G4Step* step) const override;

    inline void SetAtomNumFilterArgs(G4int targetZ, G4int Zmax, const G4String& cat)
    {
        _fTargetZ = targetZ;
        _fZmax = Zmax;
        _fCat = cat;
    };
    //inline void SetTargetZ(G4int targetZ) { _fTargetZ = targetZ; }
    //inline void SetZmax(G4int Zmax) { _fZmax = Zmax; }
    //inline void SetCat(const G4String& cat) { _fCat = cat; }

private:
    //G4String fName;
    G4int _fTargetZ;
    G4int _fZmax;
    G4String _fCat;

    AtomNumFilterMsgr* _sfMessenger;
};
